<?php
require_once('konfiguration.html');

$files2=array("english"=>"english10000projectgutenberg.txt");
$index=1;
foreach($files2 as $language=>$file)
{  $lines=file($file);
   print count($lines); 
   foreach($lines as $line)
   { 
      $line_number+=1;
      echo 'Number of Line is:',$line_number;
      preg_match_all('/([a-zA-Z]+) = [0-9]+/',$line,$matches,PREG_PATTERN_ORDER);  // [a-zA-Z]+
	  print_r($matches);
	  foreach ($matches[1] as $word)
	  {    mysql_query("INSERT INTO mostcommonwords2 VALUES ('$language','$word',$index)");
	       $index+=1;
		   print $word.'<br>';
	       set_time_limit(10);
	  }

   }
}



?>